import Vue from 'vue'
import store from '@/store/index'
import axios from 'axios'
axios.defaults.baseURL = store.state.myStore.restUrl
axios.defaults.timeout = 10000
// 表示跨域请求时是否需要使用凭证
axios.defaults.withCredentials = true
axios.interceptors.response.use(res => res.data, err => Promise.reject(err))

Vue.prototype.$axios = axios
